package com.bolun998300.personal_blog_springboot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bolun998300.personal_blog_springboot.dao.Blog_TagDao;
import com.bolun998300.personal_blog_springboot.pojo.Blog_Tag;

@Service
public class Blog_TagService {
	
	@Autowired
	private Blog_TagDao blogTagDao;
	
	public void add(Blog_Tag bean) {
		blogTagDao.save(bean);
	}
	
	public List<Blog_Tag> findByBlogId(int blogId){
		return blogTagDao.findByBlogId(blogId);
	}

	public Long countByTagId(int tagId){
		return blogTagDao.countByTagId(tagId);
	}
}
